<!--
*@Author: QWP
*@Description: 编辑隐患
*@Date: 2024-07-08 17:04:38
-->
<template>
  <u-dialog v-bind="$attrs"
    @close="dialogClose">
    <a-layout class="f-h-100">
      <a-layout-content class="s-bg-white"
        style="overflow: auto">
        <a-space  direction="vertical">
          <u-busi-card title="基本信息"
            :bordered="false">
            <u-form :elements="formEls"
              :model="form"
              :gutter="0"
              ref="formRef">
            </u-form>
          </u-busi-card>
        </a-space>
      </a-layout-content>
    </a-layout>
  </u-dialog>
</template>

<script lang='ts' setup>
import { ref, reactive, computed, onMounted, h } from 'vue' 

import { useRoute, useRouter } from 'vue-router'
import { _IFormEl, _IExtra } from '@/src/components/common/form/interface';
import { FormInstance, FormItemProps } from 'ant-design-vue';
import { HomeOutlined, FileTextOutlined, UploadOutlined } from '@ant-design/icons-vue';
import { TreeProps } from 'ant-design-vue/es/vc-tree';
import { ColumnProps } from 'ant-design-vue/es/table';
import { _IColumnProps } from '@/components/common/tableEdit/interface.ts'
import { fileCols } from '@/common/model/fileCols'
const route = useRoute()

const formRef = ref<FormInstance>()
const form = reactive({})
const formItemProps: FormItemProps & _IExtra = {
  labelWidth: '120px',
  colon: false
}
const formEls: Array<_IFormEl> = [
  { label: '隐患名称', key: 'ssbm', col: { span: 24,}, element: 'input', 
    formItemProps: { ...formItemProps, required: true } 
  },
  { label: '专题专项', key: 'ry', col: { span: 12 }, element: 'select', 
    formItemProps: { ...formItemProps, required: true },
    componentProps: { 
      options: [
        { label: '', value: '1'},
        { label: '', value: '2'},
      ]
    }
  },
  { label: '设计层面', key: 'kqlx', col: { span: 12 }, element: 'select', 
    formItemProps: { ...formItemProps, required: true },
    componentProps: { 
      options: [
        { label: '', value: '1'},
      ]
    } 
  },
  { label: '责任单位', key: 'ksrq', col: { span: 12 }, element: 'number', 
    formItemProps: { ...formItemProps, required: true } 
  },
  { label: '重大隐患', key: 'zdyh', col: { span: 24 }, element: 'textarea', 
    formItemProps: { ...formItemProps, required: true } 
  },
  { label: '整改措施', key: 'zgcs', col: { span: 24 }, element: 'textarea', 
    formItemProps: { ...formItemProps, required: true } 
  },
  { label: '检查时间', key: 'ts', col: { span: 12 }, element: 'datepicker', 
    formItemProps: { ...formItemProps, required: true } ,
  },
  { label: '计划完成时间', key: 'jhwcsj', col: { span: 12 }, element: 'datepicker', 
    formItemProps: { ...formItemProps, required: true } ,
  },
  { label: '整改接待', key: 'zgjd', col: { span: 12 }, element: 'select', 
    formItemProps: { ...formItemProps, required: true },
    componentProps: { 
      options: [
        { label: '', value: '1'},
      ]
    } 
  },
  { label: '整改进展', key: 'zgjz', col: { span: 24 }, element: 'textarea', 
    formItemProps: { ...formItemProps, required: true } 
  },
  { label: '备注', key: 'bz', col: { span: 24 }, element: 'textarea', 
    formItemProps: { ...formItemProps, required: true } 
  },
]

// 弹窗关闭
const dialogClose = () => {
  formRef.value.form.resetFields();
}
</script>

<style lang='scss' >
</style>